﻿@model Transport.Areas.Administrator.Models.RatesTableModel
@{
    ViewBag.Title = "Sửa bảng giá";
}
  
@using (Html.BeginForm("SaveForCustomer", "RatesTable", FormMethod.Post))
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Areas/Administrator/Content/images/ico-catalog.png")" alt="" />
            Sửa bảng giá
        </div>
        <div class="options">
            <button type="submit" name="save" value="save" class="t-button">Lưu</button>
            <a href="@Url.Action("Edit", "Customer", new { id = Model.CustomerId})" class="t-button">Quay lại</a>
        </div>
    </div>
    
    @Html.HiddenFor(model => model.RatesTableId)
    @Html.HiddenFor(model => model.CustomerId)
    <table width="100%">
        <tr>
            <td class="adminTitle">
                @Html.Label("Mô tả")
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </td>
        </tr>
        @if (Model.IsExtraColumn)
        {
        <tr>
            <td valign="top" class="adminTitle">
                @Html.Label("Trọng lượng vượt")
            </td>
            <td>
                @(Html.Telerik().IntegerTextBoxFor(model => model.WeightOver).MinValue(0).MaxValue(int.MaxValue).NumberGroupSeparator("."))
                @(Html.ValidationMessageFor(model => model.WeightOver))
            </td>
        </tr>
        }
        else
        {
            <tr>
                <td valign="top" class="adminTitle">
                    @Html.Label("Trọng lượng từ")
                </td>
                <td>
                    @(Html.Telerik().IntegerTextBoxFor(model => model.MinWeight).MinValue(0).MaxValue(int.MaxValue).NumberGroupSeparator("."))
                    @(Html.ValidationMessageFor(model => model.MinWeight))
                </td>
            </tr>
            <tr>
                <td valign="top" class="adminTitle">
                    @Html.Label("Trọng lượng đến")
                </td>
                <td>
                    @(Html.Telerik().IntegerTextBoxFor(model => model.MaxWeight).MinValue(0).MaxValue(int.MaxValue).NumberGroupSeparator("."))
                    @(Html.ValidationMessageFor(model => model.MaxWeight))
                </td>
            </tr>
        }
        <tr>
            <td class="adminTitle">
                @Html.Label("Nội tỉnh (A)")
            </td>
            <td>
                @Html.Telerik().NumericTextBoxFor(model => model.PriceColumnA).MinValue(0).MaxValue(int.MaxValue).NumberGroupSeparator(".").DecimalDigits(0)
                @Html.ValidationMessageFor(model => model.PriceColumnA)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.Label("lblPriceColumnB", "TX.TD Một - Tp.Biên Hòa - Tp.Vũng Tàu (B)")
            </td>
            <td>
                @Html.Telerik().NumericTextBoxFor(model => model.PriceColumnB).MinValue(0).MaxValue(int.MaxValue).NumberGroupSeparator(".").DecimalDigits(0)
                @Html.ValidationMessageFor(model => model.PriceColumnB)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.Label("< 300 km (C)")
            </td>
            <td>
                @Html.Telerik().NumericTextBoxFor(model => model.PriceColumnC).MinValue(0).MaxValue(int.MaxValue).NumberGroupSeparator(".").DecimalDigits(0)
                @Html.ValidationMessageFor(model => model.PriceColumnC)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.Label("> 300 km (D)")
            </td>
            <td>
                @Html.Telerik().NumericTextBoxFor(model => model.PriceColumnD).MinValue(0).MaxValue(int.MaxValue).NumberGroupSeparator(".").DecimalDigits(0)
                @Html.ValidationMessageFor(model => model.PriceColumnD)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.Label("lblPriceColumnE", "Tp.Hà Nội - Tp.Đà Nẵng (E)")
            </td>
            <td>
                @Html.Telerik().NumericTextBoxFor(model => model.PriceColumnE).MinValue(0).MaxValue(int.MaxValue).NumberGroupSeparator(".").DecimalDigits(0)
                @Html.ValidationMessageFor(model => model.PriceColumnE)
            </td>
        </tr>
    </table>
    <br />
}


